import decimal
'''import mpmath'''
import sys

def is_even(a):
    if a % 2 == 0:
        print ('Even!')
        return True
    else:
        print ('Odd!')
        return False

def exemplonum():
    a = 99
    print sys.maxint
    u = 99.76
    v = 2 + 2j
    z = u + v
    print z, z.real, z.imag


def exemploseq():
    s1 = "The 'portuguese' Inquisition"
    s2 = "tRoiKa"
    s3 = s1 + ' ' + s2
    l1 = [1, 2, "lista", [3, 4, 5.333]]
    a = l1[0] + l1[1] + l1[3][1]
    t1 = (1, 2, "tuplo")
    print t1[1]

def exemplocontrolo1():
    if 1 > 0:
        print "OK"
    if 1.2 == 33:
        print "NO"
    else:
        print "OK"
    expr1 = True or False
    expr2 = True and True
    if expr1:
        if expr2:
            print "OK"
        else:
            print "NOT"
    else: 
        print "NOT"


def exemplocontrolo2():
    for i in range(0,10):
        print i * i
    l1 = range(20, 30)
    print
    soma = 0
    for x in l1:
        soma += x
    for k in xrange(20, 0, -1):
        if k > 10:
            print k
        else:
            print 2 * k
                







'''is_even(9)
exemplonum()
exemploseq()
exemplocontrolo1()'''
exemplocontrolo2()